package com.example.springdemo6.controller;


import com.example.springdemo6.service.Demo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/hello")
public class DemoController {
    private Demo demo;

    @RequestMapping("/sayHi")
    public void sayHi() {
        demo = new Demo();
        demo.sayHi();
    }

}
